package com.hust.edu.cn.controller;


import com.hust.edu.cn.service.FriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  友链显示控制器
 * </p>
 *
 * @author Yu Jian
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/friend")
public class FriendShowController {

    @Autowired
    private FriendService friendLinkService;

    @GetMapping("/friends")
    public String friends(Model model) {
        model.addAttribute("friendlinks",friendLinkService.listFriendLink());
        return "friends";
    }
}

